DECLARE SUB RndFight ()
DECLARE SUB Stats ()
DECLARE SUB CannotGo ()
DECLARE SUB SaveGame ()
DECLARE SUB RestoreInGame ()
DECLARE SUB CannotDo ()
DECLARE SUB Inventory ()
DECLARE SUB Quit ()
DECLARE SUB Help ()
'$INCLUDE: 'c:\bc7\programs\cyber\global.bi'

SUB TemplateRoom

RestoreRoom = 0
RndFight
Room:
  CLS
  PRINT "Room Description"
Command:
  LINE INPUT "> "; a$: a$ = UCASE$(a$)
  IF a$ = "N" OR a$ = "NORTH" OR a$ = "GO NORTH" THEN GOTO Room
  IF a$ = "S" OR a$ = "SOUTH" OR a$ = "GO SOUTH" THEN GOTO Room
  IF a$ = "E" OR a$ = "EAST" OR a$ = "GO EAST" THEN GOTO Room
  IF a$ = "W" OR a$ = "WEST" OR a$ = "GO WEST" THEN GOTO Room
  IF a$ = "STATS" THEN Stats: GOTO Command
  IF a$ = "SEARCH" OR a$ = "SEARCH ROOM" THEN GOTO SearchRoom: GOTO Command
  IF a$ = "LOOK" THEN GOTO Room: GOTO Command
  IF a$ = "HELP" OR a$ = "?" THEN Help: GOTO Room
  IF a$ = "QUIT" OR a$ = "EXIT" THEN Quit: GOTO Command
  IF a$ = "I" OR a$ = "INVENTORY" THEN Inventory: GOTO Command
  IF a$ = "SAVE" OR a$ = "SAVE GAME" THEN SaveGame: GOTO Command
  IF a$ = "RESTORE" OR a$ = "RESTORE GAME" THEN RestoreInGame: GOTO Command
  CannotDo
  GOTO Command

SearchRoom:
  GOTO Command

END SUB

SUB TemplateTalk
  CLS
  PRINT "Description"
  COLOR 15, 0, 9: PRINT "Opening Line"
Talk:
  COLOR 7, 0, 8: LINE INPUT "? "; a$: a$ = UCASE$(a$)
  COLOR 15, 0, 9
  IF a$ = "NAME" THEN PRINT "": GOTO Talk
  IF a$ = "JOB" THEN PRINT "": GOTO Talk
  IF a$ = "BYE" OR a$ = "GOODBYE" THEN GOTO EndConversation
  b = INT((3) * RND)
  IF b = 0 THEN PRINT "I cannot help you with that."
  IF b = 1 THEN PRINT "Just exactly what do you want?"
  IF b = 2 THEN PRINT "I'm not sure about that."
  GOTO Talk

EndConversation:
  COLOR 7, 0, 8
END SUB

